import ElectronStore from 'electron-store'

const store = new ElectronStore()
console.log(store)
// 当前用户id
export const setUserId = (key, id) => {
  store?.set(key, id)
}
// 获取当前用户id
export const getUserId = (key) => {
  return store.get(key)
}
// 设置用户信息
export const setUser = (key, user) => {
  store.set(key, user)
}
// 获取用户信息
export const getUser = (key) => {
  return store.get(key)
}
// 设置当前用户数据   token
export const setUserData = (key, data) => {
  store.set(key, data)
}
// 获取当前用户数据   token
export const getUserData = (key) => {
  return store.get(key)
}
